<!DOCTYPE HTML>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title></title>
		<link rel="stylesheet" type="text/css" href="../../css/api.css" />
		<link rel="stylesheet" type="text/css" href="../../css/style.css" />
		<link rel="stylesheet" type="text/css" href="../../css/btnplus.css" />
		<style type="text/css">
			html,body{ height:100%; background-color:#F7F8FA; }
			.type_insurance{ padding: 15px;}
			.type_insurance b{ display:block; font-size: 12px; color: #808080; font-weight: 400; line-height: 35px;}
			.type_insurance li{ background-color: #fff; border-radius: 4px; margin-bottom: 10px; padding: 20px 15px;}
			.type_insurance img{ width: 50px; height: 50px; margin-right: 15px;}
			.type_insurance h4{ display:block; font-size: 18px; font-weight: 500; color: #333;}
			.type_insurance em{ display:block; width: 17px; height: 17px; border-radius: 50%; background-image: url(../images/img_24.png); background-size: 100% 100%;}
			.type_insurance li.on em{ background-image: url(../../image/img_25.png);}
			.type_insurance .btn{ padding-top: 100px;}
		</style>
	</head>
	<body>
		<div class="type_insurance">
			<b>请选择身份</b>
			<ul id="usertypelist">
				<li class="on" tapmode onclick="selusertype(this);" attr-type="1">
					<div class="m_cell_hd"><img src="../../image/img_22.png" alt="" /></div>
					<div class="m_cell_hd m_cell_primary"><h4>我是车主</h4></div>
					<div class="m_cell_ft"><em></em></div>
				</li>
				<li tapmode onclick="selusertype(this);" attr-type="2">
					<div class="m_cell_hd"><img src="../../image/img_23.png" alt="" /></div>
					<div class="m_cell_hd m_cell_primary"><h4>我是企业</h4></div>
					<div class="m_cell_ft"><em></em></div>
				</li>
			</ul>
			<ul class="btn">
				<button class="d_btn" id="login-btn" tapmode="btnpress" onclick="regnext();">下一步</button>
			</ul>
		</div>
	</body>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/app.js"></script>
	<script type="text/javascript" src="../../script/md5.js"></script>
	<script type="text/javascript">
		var usertype = 1;
		var mobile = '';
		var password = '';
		apiready = function() {
			api.parseTapmode();
			mobile = api.pageParam.mobile;
			password = api.pageParam.password;
			api.addEventListener({
                name: 'navitembtn'
            }, function(ret, err) {
                if (ret.type == 'left') {
					api.closeWin({
					});
                }
            });
		}
		function selusertype(obj) {
			var liList = $api.byId('usertypelist').children;
			for (var i = 0; i < liList.length; i++) {
				if($api.hasCls(liList[i],'on'))
				{
					$api.removeCls(liList[i],'on');
				}
			}
			usertype = $api.attr(obj,"attr-type");
			$api.addCls(obj,'on');
		}
		function regnext() {
			var param = {
				mobile: mobile,
				password: password,
				regtype: 2
			};
			var pagename = 'reggoodsuser';
			var pagetitle = '车主认证';
			if(usertype == 2)
			{
				pagename = 'regcompanyuser';
				pagetitle = '企业认证';
			}
			openNavWin('#ddd',pagename+'_win',pagename+'_frm.html',pagetitle,false,false,true,[],param);
		}
	</script>
</html>